<?php

/*
 * Camelot PHP Tools
 *
 * @version 2.0
 * @author Bendsoft
 * @package PHP Tools
 * @subpackage Camelot
 * @license FreeBSD License (www.bendsoft.com/licensing/)
 *
 */

/**
 * Class containing standard information on SharePoint content types
 * @author Bendsoft
 */
class SharePointContentTypes {
    
    /**
     * Standard content types with ID as key
     * @var array
     */
    public $contentTypesByID = array(
        '0x0101' => 'Document',
        '0x0102' => 'Event',
        '0x0103' => 'Issue',
        '0x0104' => 'Announcement',
        '0x0105' => 'Link',
        '0x0106' => 'Contact',
        '0x0107' => 'Message',
        '0x0108' => 'Task',
        '0x0109' => 'Workflow History',
        '0x0110' => 'Post',
        '0x0111' => 'Comment',
        '0x0116' => 'East Asia Contact',
        '0x0120' => 'Folder'
    );
    
    /**
     * Standard content types with Name as key
     * @var array
     */
    public $contentTypesByName = array(
        'Document' => '0x0101',
        'Event' => '0x0102',
        'Issue' => '0x0103',
        'Announcement' => '0x0104',
        'Link' => '0x0105',
        'Contact' => '0x0106',
        'Message' => '0x0107',
        'Task' => '0x0108',
        'Workflow History' => '0x0109',
        'Post' => '0x0110',
        'Comment' => '0x0111',
        'East Asia Contact' => '0x0116',
        'Folder' => '0x0120'
    );
    
    public static function GetContentType($type){
        $ct = new SharePointContentTypes();
        return $ct->contentTypesByName[$type];
    }
}

?>
